package com.jingfang.cloud;

import com.jingfang.cloud.constant.MzConstants;
import org.dromara.quickswing.ui.app.QSPrefs;

import java.io.File;

public class MzPrefs extends QSPrefs {
    protected MzPrefs() {
        super("/" + MzConstants.APP_DATA_DIR.toLowerCase());
    }

    @Override
    protected String getKeyPrefix() {
        return "mz";
    }

    @Override
    protected void initDefaults() {
    }

    public Boolean getUsbDriverInstalled() {
        return getState().getBoolean("usb_driver_installed", false);
    }

    public void setUsbDriverInstalled(Boolean installed) {
        getState().putBoolean("usb_driver_installed", installed);
    }

    public String buildTmpFile(String fileName) {
        return getDataPath() + File.separator + "tmp" + File.separator + fileName;
    }
}
